package com.jeegit.springboot.sitemesh3.config;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.jeegit.springboot.sitemesh3.filter.SitemeshFilter;


/**
 * @author chen jia hao
 */
@Configuration
public class WebConfig {

    @Bean
    public FilterRegistrationBean<SitemeshFilter> sitemeshFilter(){
        FilterRegistrationBean<SitemeshFilter > sitemeshFilter = new FilterRegistrationBean<>();
        sitemeshFilter.setFilter(new SitemeshFilter());
        return sitemeshFilter;
    }

}
